#ifndef __edaSA_h__
#define __edaSA_h__

#include "edaSearch.h"
#include "edaMove.h"
#include "edaMoveGen.h"
#include "edaContinue.h"
#include "edaCoolingSchedule.h"
#include "rng.h"

class edaSA: public edaSearch
{
 public:
  edaSA();
  edaSA( edaMove *_move,
	 edaMoveGen *_moveRandom,
	 edaContinue *_continueCriteria,
	 double _initTemperature,
	 edaCoolingSchedule *_coolingSchedule );
  ~edaSA();
  /**
   * Launch the search
   * \param solution Solution to improve
   * \return true
   */
  bool search(edaSolution &sol);
  virtual void Serialize(edaBuffer &buf, bool pack);

  setClassID( _SYSCLASSID_ + _CLSID_EDASA_ );
  
 private:
  edaMove *move;
  edaMoveGen *moveRandom;
  edaContinue *continueCriteria;
  double initTemperature;
  edaCoolingSchedule *coolingSchedule;
  RNG rnd;
};

#endif
